package de.tsystems.jsfdict.api;

import de.tsystems.jsfdict.api.impl.LanguageDao;
import de.tsystems.jsfdict.model.Language;

public interface LanguageService extends GenericService<Language> {

    /**
     * returns language by code
     * @param languageCode the code of the language {@see de.tsystems.jsfdict.api.LanguageService.LanguageEnum}
     * @return Language object
     */
    Language findLanguage(String languageCode);

    void setLanguageDao(LanguageDao mock);

    LanguageDao getLanguageDao();

    public enum LanguageEnum {
        RUSSIAN("ru", "Russian"),
        ENGLISH("en", "English"),
        DEUTSCH("de", "Deutsch");

        private String code;
        private String text;

        private LanguageEnum(String code, String text) {
            this.code = code;
            this.text = text;
        }
    }
}